<%@ page contentType="text/html"%>
<%@ include file="/jsp/admin_header.jsp"%>
<%@ include file="/jsp/admin_left_menu.jsp"%>

<%@ page import="it.dei.unipd.healthservice.resource.*"%>
<H1>Creazione Nuovo Fornitore</H1>
<% Fornitore fornitore = (Fornitore)request.getAttribute("fornitore");%>
<%	if (fornitore==null)
		fornitore = new Fornitore("","","","","","","","","");
%>
<!--  
      Autore: Giorgio Vitale
-->
<% String completato = (String)request.getAttribute("completato");%>
<%	if (completato!=null){%>
Operazione completata!
<%} else {%>
<form id="registration-form" method="post" action="create_fornitore" >
	<table class="corpo">
		<tbody>
		<tr>
			<td width="150"><label for="piva">P.IVA:</label></td>
			<td><input name="piva" type="textbox" size="20" value="<%=fornitore.getPiva()%>"/></td>
		</tr>
		<tr>
			<td width="150"><label for="ragionesociale">Ragione Sociale:</label></td>
			<td><input name="ragionesociale" type="textbox" size="20" value="<%=fornitore.getRagioneSociale()%>"/></td>
		</tr>
		<tr>
			<td width="150"><label for="mail">mail:</label></td>
			<td><input name="mail" type="textbox" size="20" value="<%=fornitore.getMail()%>"/></td>
		</tr>
		<tr>
			<td width="150"><label for="tel">Telefono:</label></td>
			<td><input name="tel" type="textbox" size="20" value="<%=fornitore.getTel()%>"/></td>
		</tr>
		<tr>
			<td width="150"><label for="stato">stato:</label></td>
			<td><input name="stato" type="textbox" size="20" value="<%=fornitore.getStato()%>"/></td>
		</tr>
		<tr>
			<td width="150"><label for="provincia">provincia:</label></td>
			<td><input name="provincia" type="textbox" size="20" value="<%=fornitore.getProvincia()%>"/></td>
		</tr>
		<tr>
			<td width="150"><label for="citta">citt&agrave;:</label></td>
			<td><input name="citta" type="textbox" size="20" value="<%=fornitore.getCitta()%>"/></td>
		</tr>
		<tr>
			<td width="150"><label for="cap">cap:</label></td>
			<td><input name="cap" type="textbox" size="5" value="<%=fornitore.getCap()%>"/></td>
		</tr>
		<tr>
			<td width="150"><label for="indirizzo">indirizzo:</label></td>
			<td><input name="indirizzo" type="textbox" size="20" value="<%=fornitore.getIndirizzo()%>"/></td>
		</tr>
		<tr>
			<td width="150"> </td>
			<td><input name="submit" type="submit"/></td>
		</tr>
		</tbody>
	</table>
</form>
<% String err = (String)request.getAttribute("errore");%>
<%	if (err!=null){%>
<%= err %>
<%} //err !=null%>
<%} //completato!=null%>

<jsp:include page="/jsp/admin_footer.jsp" flush="true" />
</BODY>
</HTML>